// /*
//  * Licensed under the Apache License, Version 2.0 (the "License");
//  * you may not use this file except in compliance with the License.
//  * You may obtain a copy of the License at
//  *
//  * http://www.apache.org/licenses/LICENSE-2.0
//  *
//  * Unless required by applicable law or agreed to in writing, software
//  * distributed under the License is distributed on an "AS IS" BASIS,
//  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//  * See the License for the specific language governing permissions and
//  * limitations under the License.
//  */

// 'use strict';

module.exports.DOCUMENT_STORE_CROSS_ADDRESS = '0xb0ef498FC22f550F6A3f2441099195ec7A57fDEe';

module.exports.DOCUMENT_STORE_CROSS_ABI = [
    {
        inputs: [
            {
                internalType: "string",
                name: "_name",
                type: "string",
            },
        ],
        stateMutability: "nonpayable",
        type: "constructor",
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: true,
                internalType: "bytes32",
                name: "document",
                type: "bytes32",
            },
        ],
        name: "DocumentIssued",
        type: "event",
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: true,
                internalType: "bytes32",
                name: "document",
                type: "bytes32",
            },
        ],
        name: "DocumentRevoked",
        type: "event",
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: true,
                internalType: "address",
                name: "previousOwner",
                type: "address",
            },
            {
                indexed: true,
                internalType: "address",
                name: "newOwner",
                type: "address",
            },
        ],
        name: "OwnershipTransferred",
        type: "event",
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "",
                type: "bytes32",
            },
        ],
        name: "documentIssued",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "",
                type: "bytes32",
            },
        ],
        name: "documentRevoked",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "name",
        outputs: [
            {
                internalType: "string",
                name: "",
                type: "string",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "owner",
        outputs: [
            {
                internalType: "address",
                name: "",
                type: "address",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "renounceOwnership",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "newOwner",
                type: "address",
            },
        ],
        name: "transferOwnership",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [],
        name: "version",
        outputs: [
            {
                internalType: "string",
                name: "",
                type: "string",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "document",
                type: "bytes32",
            },
        ],
        name: "issue",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes32[]",
                name: "documents",
                type: "bytes32[]",
            },
        ],
        name: "bulkIssue",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "document",
                type: "bytes32",
            },
        ],
        name: "getIssuedBlock",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "document",
                type: "bytes32",
            },
        ],
        name: "isIssued",
        outputs: [
            {
                internalType: "bool",
                name: "",
                type: "bool",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "document",
                type: "bytes32",
            },
            {
                internalType: "uint256",
                name: "blockNumber",
                type: "uint256",
            },
        ],
        name: "isIssuedBefore",
        outputs: [
            {
                internalType: "bool",
                name: "",
                type: "bool",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "document",
                type: "bytes32",
            },
        ],
        name: "revoke",
        outputs: [
            {
                internalType: "bool",
                name: "",
                type: "bool",
            },
        ],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes32[]",
                name: "documents",
                type: "bytes32[]",
            },
        ],
        name: "bulkRevoke",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "document",
                type: "bytes32",
            },
        ],
        name: "isRevoked",
        outputs: [
            {
                internalType: "bool",
                name: "",
                type: "bool",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "document",
                type: "bytes32",
            },
            {
                internalType: "uint256",
                name: "blockNumber",
                type: "uint256",
            },
        ],
        name: "isRevokedBefore",
        outputs: [
            {
                internalType: "bool",
                name: "",
                type: "bool",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
];

module.exports.DOCUMENT_STORE_CROSS_BIN = "0x60806040526040518060400160405280600581526020017f322e332e3000000000000000000000000000000000000000000000000000000081525060029080519060200190620000519291906200021e565b503480156200005f57600080fd5b506040516200137c3803806200137c833981810160405260208110156200008557600080fd5b8101908080516040519392919084640100000000821115620000a657600080fd5b83820191506020820185811115620000bd57600080fd5b8251866001820283011164010000000082111715620000db57600080fd5b8083526020830192505050908051906020019080838360005b8381101562000111578082015181840152602081019050620000f4565b50505050905090810190601f1680156200013f5780820380516001836020036101000a031916815260200191505b506040525050506000620001586200021660201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35080600190805190602001906200020e9291906200021e565b5050620002c4565b600033905090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200026157805160ff191683800117855562000292565b8280016001018555821562000292579182015b828111156200029157825182559160200191906001019062000274565b5b509050620002a19190620002a5565b5090565b5b80821115620002c0576000816000905550600101620002a6565b5090565b6110a880620002d46000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80635a9e03ca116100975780638da5cb5b116100665780638da5cb5b1461055b578063b75c7dc61461058f578063bf40b904146105d3578063f2fde38b1461061557610100565b80635a9e03ca14610409578063715018a6146104575780637df20826146104615780638bc36c911461051957610100565b8063339b6b39116100d3578063339b6b391461023c5780634294857f1461028a5780634ada8076146102ce57806354fd4d501461038657610100565b806306fdde03146101055780630f75e81f14610188578063163aa631146101b657806333358d2d146101fa575b600080fd5b61010d610659565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561014d578082015181840152602081019050610132565b50505050905090810190601f16801561017a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101b46004803603602081101561019e57600080fd5b81019080803590602001909291905050506106f7565b005b6101e2600480360360208110156101cc57600080fd5b810190808035906020019092919050505061084f565b60405180821515815260200191505060405180910390f35b6102266004803603602081101561021057600080fd5b810190808035906020019092919050505061086f565b6040518082815260200191505060405180910390f35b6102726004803603604081101561025257600080fd5b810190808035906020019092919080359060200190929190505050610887565b60405180821515815260200191505060405180910390f35b6102b6600480360360208110156102a057600080fd5b81019080803590602001909291905050506108c8565b60405180821515815260200191505060405180910390f35b610384600480360360208110156102e457600080fd5b810190808035906020019064010000000081111561030157600080fd5b82018360208201111561031357600080fd5b8035906020019184602083028401116401000000008311171561033557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192905050506108e8565b005b61038e610922565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103ce5780820151818401526020810190506103b3565b50505050905090810190601f1680156103fb5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61043f6004803603604081101561041f57600080fd5b8101908080359060200190929190803590602001909291905050506109c0565b60405180821515815260200191505060405180910390f35b61045f610a00565b005b6105176004803603602081101561047757600080fd5b810190808035906020019064010000000081111561049457600080fd5b8201836020820111156104a657600080fd5b803590602001918460208302840111640100000000831117156104c857600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610b6d565b005b6105456004803603602081101561052f57600080fd5b8101908080359060200190929190505050610ba6565b6040518082815260200191505060405180910390f35b610563610bbe565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105bb600480360360208110156105a557600080fd5b8101908080359060200190929190505050610be7565b60405180821515815260200191505060405180910390f35b6105ff600480360360208110156105e957600080fd5b8101908080359060200190929190505050610d43565b6040518082815260200191505060405180910390f35b6106576004803603602081101561062b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610dc0565b005b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106ef5780601f106106c4576101008083540402835291602001916106ef565b820191906000526020600020905b8154815290600101906020018083116106d257829003601f168201915b505050505081565b6106ff610fb2565b73ffffffffffffffffffffffffffffffffffffffff1661071d610bbe565b73ffffffffffffffffffffffffffffffffffffffff16146107a6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b806107b08161084f565b15610806576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a815260200180611039603a913960400191505060405180910390fd5b436003600084815260200190815260200160002081905550817f01a1249f2caa0445b8391e02413d26f0d409dabe5330cd1d04d3d0801fc42db360405160405180910390a25050565b600080600360008481526020019081526020016000205414159050919050565b60036020528060005260406000206000915090505481565b6000816004600085815260200190815260200160002054111580156108c057506000600460008581526020019081526020016000205414155b905092915050565b600080600460008481526020019081526020016000205414159050919050565b60005b815181101561091e5761091082828151811061090357fe5b6020026020010151610be7565b5080806001019150506108eb565b5050565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109b85780601f1061098d576101008083540402835291602001916109b8565b820191906000526020600020905b81548152906001019060200180831161099b57829003601f168201915b505050505081565b6000806003600085815260200190815260200160002054141580156109f8575081600360008581526020019081526020016000205411155b905092915050565b610a08610fb2565b73ffffffffffffffffffffffffffffffffffffffff16610a26610bbe565b73ffffffffffffffffffffffffffffffffffffffff1614610aaf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60005b8151811015610ba257610b95828281518110610b8857fe5b60200260200101516106f7565b8080600101915050610b70565b5050565b60046020528060005260406000206000915090505481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000610bf1610fb2565b73ffffffffffffffffffffffffffffffffffffffff16610c0f610bbe565b73ffffffffffffffffffffffffffffffffffffffff1614610c98576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b81610ca2816108c8565b15610cf8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180610fec6027913960400191505060405180910390fd5b436004600085815260200190815260200160002081905550827f7283b5ab9758f7fba773279e4fd50ea7b136bd1d8371dcae9c5ce529c55343d760405160405180910390a250919050565b600081610d4f8161084f565b610da4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526031815260200180610fbb6031913960400191505060405180910390fd5b6003600084815260200190815260200160002054915050919050565b610dc8610fb2565b73ffffffffffffffffffffffffffffffffffffffff16610de6610bbe565b73ffffffffffffffffffffffffffffffffffffffff1614610e6f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610ef5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806110136026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60003390509056fe4572726f723a204f6e6c792069737375656420646f63756d656e74206861736865732063616e206265207265766f6b65644572726f723a204861736820686173206265656e207265766f6b65642070726576696f75736c794f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734572726f723a204f6e6c792068617368657320746861742068617665206e6f74206265656e206973737565642063616e20626520697373756564a2646970667358221220985c02bd09ff412e50c4393a34ad12163bb8df573c2ce2d8415436a893959def64736f6c634300060c0033";